Skip to content

feat: physical device support, WiFi testing, HTTP fallback (v0.5.1)#39

Merged
pbertsch merged 7 commits intomainfrom
feat/physical-device-support
Mar 26, 2026
Merged

feat: physical device support, WiFi testing, HTTP fallback (v0.5.1)#39
pbertsch merged 7 commits intomainfrom
feat/physical-device-support

Conversation

@pbertsch
Copy link
Copy Markdown
Contributor

@pbertsch pbertsch commented Mar 26, 2026

Summary

Complete physical device support for iOS and Android, with HTTP fallback transport and WiFi testing mode.

Physical Device Infrastructure

  • Physical iOS: launch/terminate via xcrun devicectl, token via idevicesyslog, port forwarding via managed iproxy
  • Physical Android: ADB validation, device reachability check, stale port forward cleanup
  • HTTP POST fallback (POST /probe/rpc): stateless transport for physical devices — each command is an independent HTTP request, no persistent connection to drop
  • ProbeClient interface: both WebSocket Client and HTTPClient satisfy it, enabling transport-agnostic execution

WiFi Testing (recommended for physical iOS)

  • --host <ip> flag to connect directly to device WiFi IP (no USB, no iproxy)
  • --token <token> flag to skip USB-dependent token auto-detection
  • --dart-define=PROBE_WIFI=true binds agent to 0.0.0.0 for network access
  • Tested: 11/12 E2E tests pass over WiFi with zero connection drops (vs frequent drops over USB-C)

ProbeScript Enhancements

  • tap "X" if visible syntax — silently skips when widget not found (also works with type, clear, long press, double tap)
  • take screenshot "name" — no longer requires called keyword
  • Direct onTap fallback for Semantics-wrapped widgets on physical devices

Connection Resilience

  • WebSocket ping/pong keepalive (5s interval)
  • Auto-reconnect on connection loss (up to 2 retries per step)
  • EnsureIProxy() / EnsureADB() — automatic tool validation and stale process cleanup
  • ProbeAgent profile mode + release mode safeguards

Physical Device Behavior

Operation Android iOS USB iOS WiFi
tap, type, see, etc. works works works
restart the app works works works (needs new token)
take screenshot works works works
clear app data works skip skip
allow/deny permission works skip skip
set location skip skip skip

Files Changed (3 commits, 38 files, +1727 / -131)

New files:

  • internal/probelink/http_client.go — HTTP POST transport
  • internal/probelink/http_client_test.go — HTTP client tests
  • internal/probelink/iface.goProbeClient interface
  • internal/ios/devicectl.go — Physical iOS device ops
  • Test files: cmd/probe, cli, ios, device packages

Core changes:

  • probe_agent/lib/src/server.dart — HTTP POST endpoint + WiFi bind support
  • probe_agent/lib/src/executor.dart — Direct onTap fallback, unique pointer IDs
  • probe_agent/lib/src/finder.dart — Visibility filtering
  • probe_agent/lib/src/agent.dart — Profile/release mode, PROBE_WIFI support
  • internal/parser/if visible suffix, screenshot name fix
  • internal/runner/ — ProbeClient interface, auto-reconnect, UseHTTP flag
  • internal/cli/test.go — --host, --token flags, iproxy/ADB management
  • internal/device/manager.go — EnsureADB, EnsureIProxy, physical detection

Test Results

  • go test ./... — 115+ tests pass across all 15 packages
  • Physical iPhone E2E (WiFi) — 11/12 tests pass, zero connection drops
  • Physical iPhone E2E (USB) — 8/12 tests pass, auto-reconnect handles USB-C drops
  • go build ./... — compiles cleanly
  • iOS simulator regression
  • Android emulator regression

Test plan

  • Physical device WiFi: launch, navigation, login, dashboard, settings, items, gestures, visual, dynamic, device, API
  • if visible syntax parsing and execution
  • HTTP POST transport round-trip
  • Screenshot name without called keyword

🤖 Generated with Claude Code

@pbertsch pbertsch requested a review from a team as a code owner March 26, 2026 05:36
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 26, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@pbertsch pbertsch force-pushed the feat/physical-device-support branch from 066e16b to 62ce902 Compare March 26, 2026 05:36
@pbertsch pbertsch changed the title feat: physical device support for iOS and Android (v0.5.0) feat: physical device support, WiFi testing, HTTP fallback (v0.5.1) Mar 26, 2026
@pbertsch pbertsch force-pushed the feat/physical-device-support branch from bb3f0ec to 476214a Compare March 26, 2026 08:33
@pbertsch pbertsch force-pushed the feat/physical-device-support branch from 476214a to 71c5d4e Compare March 26, 2026 08:36
@pbertsch pbertsch merged commit d31e288 into main Mar 26, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant